<template>
    <div class="app-newinfo">
      <h1>注册页面</h1>
       <form action="post">
         用户姓名：<input type="text" name="uname" v-model="uname"><br>
         用户密码：<input type="password" name="upwd" v-model="upwd"><br>
         <button @click.prevent="regist()">注册</button>
       </form>
    </div>
 </template>
 <script>   
  const qs = require("qs")
   export default {
     data(){
       return {
         uname:"",
         upwd:""
       }
     },
     methods:{
         regist(){
         var url = "http://127.0.0.1:3000/register";
         this.axios.post(url,qs.stringify({"uname":this.uname,"upwd":this.upwd})).then(res=>{
                console.log(res.data)
         })
       }
     },
     mounted(){
      
     }
   }
 </script>
 <style>
 </style>